//
// Created by nuo on 2021/11/18.
//


#include "serial_test/serial_test.h"

using namespace serial_test;

int main(int argc, char *argv[]) {

    ros::init(argc, argv, "serial_test_node");
    ros::NodeHandle nh;

//    std::string cloud_topic_;
//    //nh.param<std::string>("cloud_topic", cloud_topic_, "/velodyne_points");
//    //或者使用如下方式
//    YAML::Node config_node_;
//    config_node_ = YAML::LoadFile(OBSTACLE_SPACE_PATH);
//    cloud_topic_ = config_node_["cloud_topic"].as<std::string>();

    std::shared_ptr<SerialTest> serial_test_node_ptr = std::make_shared<SerialTest>(nh);

    ros::Rate rate(100);
    while (ros::ok()) {

        ros::spinOnce();

        serial_test_node_ptr->Run();

        rate.sleep();
    }

    return 0;
}